/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aiaudio.database.tablegroup;

import aiaudio.lastfm.hbase.CannotCreateTableException;
import aiaudio.database.DatabaseStorage;
import aiaudio.database.tables.TableStructure;
import java.io.IOException;

/**
 *
 * @author nastya
 */
public class NetworkAlgTableGroup extends TableGroup{
    private String userToGroupTable = "user_to_group";
    private String groupToUserTable = "group_to_user";

    public void setGroupToUserTable(String groupToUserTable) {
        this.groupToUserTable = groupToUserTable;
    }

    public void setUserToGroupTable(String userToGroupTable) {
        this.userToGroupTable = userToGroupTable;
    }

    public String getGroupToUserTable() {
        return addKey(groupToUserTable);
    }

    public String getUserToGroupTable() {
        return addKey(userToGroupTable);
    }

    public NetworkAlgTableGroup(String key, boolean dropIfExists) {
        super(key, dropIfExists);
    }

    @Override
    public void create(DatabaseStorage storage) throws CannotCreateTableException, IOException {
        createTable(storage, getUserToGroupTable(), TableStructure.NeighbourUserToGroup);
        createTable(storage, getGroupToUserTable(), TableStructure.NeighbourGroupToUser);
    }

    
    
}
